﻿namespace CSharpLogger
{
    /// <summary>
    /// Defines the contract that class factories must implement to create new ILoggerHandler objects.
    /// </summary>
    /// <remarks>Factory Method: Creator</remarks>
    public interface ILoggerHandlerFactory
    {
        /// <summary>
        /// Returns an instance of a class that implements the <see cref="ILoggerHandler"/> interface.
        /// </summary>
        /// <example>
        ///     <code>
        ///         var handler = new LoggerHandlerFactory();
        ///         var logger = handler.GetHandler<FileLogger>();
        ///     </code>
        /// </example>
        /// <returns><see cref="ILoggerHandler"/>.</returns>
        T GetHandler<T>() where T : ILoggerHandler;
    }
}
